Training optical character detection and recognition models for robotic process automation

ABSTRACT

Techniques for training an optical character recognition (OCR) model to detect and recognize text in images for robotic process automation (RPA) are disclosed. A text detection model and a text recognition model may be trained separately and then combined to produce the OCR model. Synthetic data and a smaller amount of real, human-labeled data may be used for training to increase the speed and accuracy with which the OCR text detection model and the text recognition model can be trained. After the OCR model has been trained, a workflow may be generated that includes an activity calling the OCR model, and a robot implementing the workflow may be generated and deployed.

CROSS REFERENCE TO RELATED APPLICATION

This application is a continuation of, and claims the benefit of, U.S.patent application Ser. No. 16/700,494 filed Dec. 2, 2019. The subjectmatter of this earlier filed application is hereby incorporated byreference in its entirety.

FIELD

The present invention generally relates to robotic process automation(RPA), and more specifically, to training optical character detectionand recognition (OCR) models to recognize text in images for RPA.

BACKGROUND

Robotic process automation (RPA) allows automation of the execution ofrepetitive and manually intensive activities. RPA can be used, forexample, to interact with software applications through a user interface(UI), similar to how a human being would interact with the application.Interactions with the UI were typically performed by an RPA applicationusing application programming interface (API) calls to a function thatreturns a set of coordinates (i.e., a “selector”). The RPA applicationcan then use this information to simulate a mouse click of a button, forexample, that causes the target application to act as if the user hadmanually clicked on the button.

Per the above, in a typical RPA implementation for native computingsystems, the selectors work using the underlying properties of thetextual elements of the UI to identify textual elements in theapplication (e.g., buttons, text fields, etc.). However, this techniquebreaks down when trying to analyze images, such as when trying toautomate the same software in VDEs, such as those provided by Citrix®,VMWare®, VNC®, and Windows® (Windows® Remote Desktop). The reason forthe breakdown is that VDEs stream an image of the remote desktop in asimilar manner to how video streaming services do. There are noselectors to be identified in the images (i.e., “frames”) of the video.This issue also arises when analyzing images (e.g., JPEG, GIF, PNG, BMP,etc.). The RPA application thus cannot make an API call to determine thelocation of a textual element to be provided to the application, forexample. Attempts have been made to solve this challenge usingconventionally trained optical character recognition (OCR) and imagematching for VDE scenarios. However, these techniques have proven to beinsufficiently reliable for RPA, which typically requires a high levelof accuracy.

Computer Vision™ (CV) by UiPath®, for example, identifies graphicalcomponents by using a mix of artificial intelligence (AI), OCR, textfuzzy-matching, and an anchoring system. A CV model identifies thespecific graphical elements in the image. This provides more accurateidentification of graphical elements, such as text fields, buttons,check boxes, icons, etc.

To recognize graphical elements, AI algorithms, such as FasterRegion-based Convolutional Neural Network (R-CNN), may be used. See, forexample, Shaoqing Ren et al., Faster R-CNN: Towards Real-Time ObjectDetection with Region Proposal Networks, arXiv:1506.01497v3 (submittedJun. 4, 2015). Faster R-CNN passes images of the target applicationinterface through a ResNet with dilated convolutions (also called atrousconvolutions) that output feature maps or tensors (i.e., a smaller imagewith 2048 channels). These feature maps are further passed throughanother neural network a region proposal network (RPN) that proposesthousands of possible rectangles where a graphical element of interestis believed to potentially have been found, as well as guesses withrespect to what regions are believed to be graphical elements as a listof coordinates. The feature maps are grids and there are proposals (alsocalled anchors) for each square on the grid. For each anchor, the RPNprovides a classification. Further, there is a graphical element matchscore between 0 and 1 and a regression part indicating how far an anchorwould need to be moved to match a particular graphical element. In otherwords, the RPN outputs regions where it thinks it found graphicalelements, as well as what these graphical elements are believed topotentially be and associated probabilities.

With these proposals, many crops are made from the feature tensorsoutput from the backbone ResNet. In these large feature tensors, featuredimensions are cropped. Cropped boxes are then passed again through afew layers of the CNN, which can output a more precise location andclass distribution. Such an implementation 100 of Faster R-CNN forgraphical element detection (e.g., detecting different graphical elementtypes, where boxes of text may be identified as such in an image, butwithout detecting what the text actually is) is shown in FIG. 1A. Fortext recognition, a text recognition model may be used, such as theRosetta® text recognition system 110 from Facebook® in FIG. 1B.

However, training OCR models for RPA is challenging, and conventionaltechniques do not typically yield sufficiently high confidenceintervals. This training problem also differs from training a CV modelto recognize graphical elements in the image. Thus, an improved approachto training OCR models for RPA that are robust to UI changes may bebeneficial.

SUMMARY

Certain embodiments of the present invention may provide solutions tothe problems and needs in the art that have not yet been fullyidentified, appreciated, or solved by current image analysis techniques.For example, some embodiments of the present invention pertain totraining OCR models to detect and recognize text in images for RPA.

In an embodiment, a computer program is embodied on a non-transitorycomputer-readable medium. The program is configured to cause at leastone processor to generate a first set of first synthetic data fortraining a text detection model for RPA. The first set of synthetic dataincludes images. The program is also configured to cause the at leastone processor to train the text detection model using the generatedfirst set of synthetic data over a plurality of epochs and at each epochof the first plurality of epochs, evaluate performance of the textdetection model against an evaluation dataset until a level of accuracyof the performance begins to decline. The program is further configuredto cause the at least one processor to train the text detection modelusing a set of augmented human-labeled data over a second plurality ofepochs and at each epoch of the second plurality of epochs, evaluateperformance of the text detection model against the evaluation datasetuntil a level of accuracy of the performance begins to decline. The setof human-labeled data has at least an order of magnitude fewer imagesthan the first set of synthetic data.

In another embodiment, a computer-implemented method includes generatinga first set of first synthetic data for training a text detection modelfor RPA, by a computing system. The first set of synthetic data includesimages. The computer-implemented method also includes training the textdetection model, by the computing system, using the generated first setof synthetic data over a plurality of epochs and at each epoch of thefirst plurality of epochs, evaluating performance of the text detectionmodel against an evaluation dataset, by the computing system, until alevel of accuracy of the performance begins to decline. Thecomputer-implemented method further includes training the text detectionmodel, by the computing system, using a set of augmented human-labeleddata over a second plurality of epochs and at each epoch of the secondplurality of epochs, evaluating performance of the text detection modelagainst the evaluation dataset, by the computing system, until a levelof accuracy of the performance begins to decline. Additionally, thecomputer-implemented method includes generating a second set ofsynthetic data, by the computing system, training a text recognitionmodel for RPA on the augmented human-labeled data and the second set ofsynthetic data over a third plurality of epochs, by the computingsystem, and at each epoch of the third plurality of epochs, evaluatingperformance of the text detection model against the evaluation datasetuntil a level of accuracy of the performance begins to decline, by thecomputing system.

In yet another embodiment, a computer-implemented method includesgenerating a set of synthetic data, by a computing system. Thecomputer-implemented method also includes training a text recognitionmodel for RPA on augmented human-labeled data and the set of syntheticdata over a plurality of epochs, by the computing system, and at eachepoch of the plurality of epochs, evaluating performance of the textdetection model against the evaluation dataset until a level of accuracyof the performance begins to decline, by the computing system.

BRIEF DESCRIPTION OF THE DRAWINGS

In order that the advantages of certain embodiments of the inventionwill be readily understood, a more particular description of theinvention briefly described above will be rendered by reference tospecific embodiments that are illustrated in the appended drawings.While it should be understood that these drawings depict only typicalembodiments of the invention and are not therefore to be considered tobe limiting of its scope, the invention will be described and explainedwith additional specificity and detail through the use of theaccompanying drawings, in which:

FIG. 1A illustrates an implementation of Faster R-CNN for graphicalelement detection.

FIG. 1B is an architectural diagram illustrating the Rosetta® textrecognition system from Facebook®.

FIG. 2 is an architectural diagram illustrating an RPA system, accordingto an embodiment of the present invention.

FIG. 3 is an architectural diagram illustrating a deployed RPA system,according to an embodiment of the present invention.

FIG. 4 is an architectural diagram illustrating the relationship betweena designer, activities, and drivers, according to an embodiment of thepresent invention.

FIG. 5 is an architectural diagram illustrating an RPA system, accordingto an embodiment of the present invention.

FIG. 6 is an architectural diagram illustrating a computing systemconfigured to train an OCR model to detect and recognize text in imagesfor RPA, according to an embodiment of the present invention.

FIG. 7 is a flowchart illustrating a process for training an OCR modelto detect and recognize text in images for RPA, according to anembodiment of the present invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Some embodiments pertain to training OCR models to detect and recognizetext in images for RPA. The OCR model may include a text detection modeland a text recognition model. The text detection and text recognitionmodels may be trained separately and then combined to be used inproduction in an OCR model in some embodiments (e.g., by running thetext detection model to identify where text is located and then runningthe text recognition model on portions of the image where text wasrecognized). In some embodiments, the text detection model may be basedon a Faster R-CNN architecture using ResNet-50 as a backbone. The textdetection model may first be trained on synthetic data only. Thedetection model may be evaluated against other, evaluation syntheticdata.

When the detection model reaches a good level of accuracy (e.g., 97-98%or better using an F2 or F4 threshold for detection and approximately2,000 epochs) and no longer makes progress on the evaluation syntheticdata, the synthetic data training stage may be stopped. This accuracylevel may be determined in some embodiments using an F1 score, an F2score, an F4 score, or any other suitable technique without deviatingfrom the scope of the invention. Training may then continue on real,human-labeled data with augmentations (e.g., scale, rotate, translate,change colors, any combination thereof, etc.), and performance may beevaluated on real data. By training in this manner, the detection modelbegins with a relatively high level of accuracy when it evaluates realdata and the detection model tends to generalize better.

In some embodiments, it may not be known what accuracy level may beachieved. Accordingly, some embodiments may check whether the accuracyis starting to drop when analyzing the evaluation data (i.e., the modelis performing well on the training data, but is starting to perform lesswell on the evaluation data). In certain embodiments, the trained OCRmodel including the text detection model and text recognition model mayonly be deployed if accuracy is superior to a currently deployed OCRmodel.

The text recognition model of some embodiments may use an architecturewith ResNet-18 and a single long short term memory (LSTM) layer withconnectionist temporal classification (CTC) for text decoding. Trainingmay be performed on both real, human-labeled data and synthetic data atthe same time. The same images may be used as for training the textdetection and text recognition models in some embodiments. Someembodiments take approximately 200 passes (i.e., epochs) through thereal and synthetic training data. In some embodiments, real andsynthetic images may each have approximately 100 words, andapproximately 500 real images and 500 synthetic images may be used inthe training for each epoch. The words for the synthetic data may benewly generated for each epoch. Thus, over the 200 epochs in thisexample, approximately 10,000,000 synthetic words may be analyzed.However, any suitable number of images, words, and/or epochs may be usedwithout deviating from the scope of the invention.

It is typically beneficial during training to have new images for thesystem to analyze, and since synthetic data can be generated at will,new synthetic images/words may be generated at each epoch, per theabove. This may help to make training effective despite a relativelylimited number of real, human-labeled images. Augmentations may beperformed for training recognition, but evaluation may be on the realdata only. A separate dataset may be used for end-to-end evaluation todetermine whether the model is good enough for production.

Training typically makes the model perform better, but with too muchtraining on a training set, the model may “learn” the training set toowell and may not perform well on new data that is not in the trainingset. Accordingly, some embodiments use a separate set of data forevaluation of model performance at the step where the model performedbest on the evaluation set. This helps to produce a model that performswell generally on unseen data.

In the OCR model, boxes that seem likely to contain text in an image mayfirst be detected using the text detection model. Using a techniquecalled “crop and resize,” the candidate boxes may then be cut out of theoriginal image and resized to a fixed height with variable width sincewords can have variable numbers of characters. The boxes may be combinedinto batches and run through the text recognition model (e.g., throughResNet (e.g., ResNet-18) with an LSTM layer to extract features beforerunning the features through a CTC layer for decoding). The extractedfeatures may be a matrix of numbers in a latent/hidden space and thenetwork may have the freedom to choose the best features it can find toachieve good predictions. There is a correspondence with the originalimage, however. For instance, pixels on the left side of the image mayonly influence features on the left side of the matrix, somewhat akin tohow features on the left side of an image remain on the left side whenthe image is resized.

CTC performs well at decoding a variable (usually longer) input tovariable to a variable (usually shorter) output. In some embodiments,the CTC input is the transformed image (LSTM output) and the output isthe prediction. Since each character in a word does not usually have thesame width, it may not be known which pixels correspond to whichcharacter. CTC can calculate the best prediction in some embodiments byallowing a variable number of input features to correspond to one outputcharacter.

A much smaller set of human-labeled images (e.g., several hundred, 500,1,000, etc.) than synthetic images may be used to train the OCR model insome embodiments. For instance, it was observed that an F1 score up to90% was insufficient, and even up to 93% was making significantmistakes. However, some embodiments realize a detection accuracy of95.8% or higher. It should be noted that any amount of human-labeleddata may be used without deviating from the scope of the invention.However, this tends to be more time consuming and expensive.

After the OCR model (i.e., the text detection model and the textrecognition model) reaches a sufficiently high level of accuracy on thereal evaluation data, the OCR model may then be ready for productiondeployment. An RPA workflow may be generated that includes one or moreactivities calling the textual element detection model and the OCRmodel. A robot implementing the RPA workflow may then be generated anddeployed, allowing end users to detect and recognize text for RPApurposes (e.g., for document processing, recognizing text in softwareapplications displaying images on the user's screen, etc.).

Some embodiments employ an architecture for the text recognition modelwith ResNet-18 that uses layers of recurrent neural networks (RNNs) ontop and a CTC layer to account for the fact that some letters are widerthan others. While some conventional OCR techniques use multiple LSTMlayers, this may require a longer period of time to train and executesince LSTM layers are expensive from a processing perspective. Certainembodiments use multiple LSTM layers, but it was determined that thebenefit of using multiple LSTM layers over using a single LSTM layer wasnot large and did not justify the increased processing time for someapplications. Thus, certain embodiments use a single LSTM layer withsome modifications to the CNN layer (e.g., using fewer outputs form theCNN layer than ResNet-18) that achieve similar accuracy to or evenbetter accuracy than embodiments using multiple LSTM layers.

When generating synthetic data, some embodiments attempt toprogrammatically generate images that are as close as possible to realimages that the OCR model will encounter after deployment. Scripts maybe used to place words in an image, add some noise, configure the imagein blocks (e.g., paragraphs, boxes that are like tables, boxes thatinclude randomly placed words, etc.), etc., similar to how the texttends to appear on a computing system display. For instance, the imagemay first be partitioned into parts (or windows). Each window mayrandomly be assigned a type (e.g., paragraph, random text, table, etc.).Each window type may have a different way of placing objects in thatwindow. For instance, paragraphs may add objects one after another inlines of objects, similar to a paragraph of written text. Random textmay be objects placed in random locations in that window. Tables mayplace objects aligned in a table structure.

Objects may be text objects including words or different objects with notext. Text objects may have random background colors and assigned textthat is distinct enough (e.g., in RGB value) to be distinguishable fromthe background text. Text may be assigned from a dictionary (e.g., basedon real text), numbers, date formats, randomly generated sequences ofcharacters, any combination thereof, etc. Non-text objects may beimported from a list of images, randomly drawn polygons, noise generatedpoints, any combination thereof, etc. Objects may be scaled and rotated(e.g., rotated 0-5 degrees). Text objects may be generated based on alist of fonts that are compared to the real images in some embodiments.

Some embodiments add elements such as icons with no text, random noise(e.g., randomly added dots of various sizes and shapes), drawing randompolygons (e.g., based on a random number and/or location ofinterconnected vertices) in the image of various types, shapes, andsizes, etc. Per the above, a very large amount of synthetic data may begenerated since this can be readily achieved with the hardwarecapabilities existing computing systems.

The synthetic data is typically not exactly like real data. Forinstance, rather than using actual images of running applications withmenus, icons with text, shadows, artifacts from computer resolution orimage compression, some embodiments include randomly placed text objectsand/or non-text objects in the synthetic images. Synthetically generatedimages may be scaled, the image may be made larger or smaller, the imageand/or elements therein may be rotated, colors may be changed, the imageand/or elements therein may be stretched, translated, flipped, etc.

Some embodiments use this synthetic data as a “model bootstrap” to trainthe text detection model to a detection accuracy that is sufficient tobegin training the text detection model on real, human-tagged images. Amuch smaller sample of human-tagged data may be used in some embodimentssince this data is typically much more expensive and time consuming togenerate, per the above. The synthetic data training phase allows thetext detection model to become accurate based off of a relatively smallnumber of real samples.

This human-tagged data may be modified to improve accuracy in training.“Image augmentation” may be performed (e.g., padding, rotation, colorchanges (e.g., grayscale, inverse coloring, channel permutations, hueshift, etc.), scaling, cropping, adding random noise (e.g., randompoints/lines), adding JPEG noise, scaling and scaling back, etc.). Inaddition to improving text recognition accuracy, this may also makepredictions more stable. In other words, predictions may not changesignificantly when the image is slightly changed. Text is different fromother image components since if you scale text too much (e.g., viashrinking), the ability to recognize the text may be lost.

Some embodiments may be trained to recognize text on a screen in adesired number of fonts since such text tends to be relatively similarfrom one image to another. A list of commonly used fonts may be built,and text in these fonts may be randomly chosen and mixed (e.g.,different fonts, spacings, orientations, sizes, etc.). Sizes andspacings tend to vary from one font to another, for example. Certainembodiments may be trained to recognize handwritten text. However, thistraining process may be more extensive and require more synthetic andreal samples since there is a much wider degree of variation inhandwritten text from one individual to another.

In certain embodiments, a relatively small number of character types maybe used (e.g., 100 different characters, which is smaller than the ASCIIcharacter set). For some embodiments, such as those employed torecognize text in invoices, this may encompass most or all of thecharacters that are likely to be encountered in production (e.g., whereinvoices are in English and contain dollar values for a certain enduser). A more limited character set also helps to improve the speed withwhich the OCR model can be trained and may improve accuracy. Since fewercharacters are used, the real data can be focused on this smaller set ofcharacters. The OCR model will see more examples of each of thesecharacters during training and will thus learn to detect thesecharacters more effectively. Real images are difficult to tag for OCR.It can take a human over an hour per image even when starting withpre-loaded predictions from an already trained OCR model. Thus, reducingthe need for real images is a significant advantage of some embodiments.

After training, the OCR model may be relatively large and not fastenough for some implementations where results are required quicklyand/or where a computing system running the OCR model has insufficientprocessing power. Accordingly, some embodiments use the larger OCR modelto train a smaller and faster OCR model. The larger OCR model may beused initially to learn from all of the training data. This larger modelcan then be used to provide labels for a smaller model. The smallermodel will be faster and may have more data for training since somepredictions from the larger OCR model may be used.

With some conventional OCR technologies, there is an issue that arisesaround splitting words. For example, there is no standard way to figureout what constitutes a “word” (e.g., a token) that the OCR algorithmshould output. Considering Google® OCR, for example, punctuation (e.g.,commas, periods, semicolons, question marks, exclamation points, etc.)is used to separate words. However, where a floating point number isincluded, such as the monetary value 101.11, this would be separatedinto the three tokens “101”, “.”, and “11”.

Some embodiments may apply a geometrical solution to this problem. Wordsmay be split based on a spacing threshold distance. For instance, “$100”may be recognized as one single word, but “$100” may be recognized astwo separate words. Commas, semicolons, etc. may be assigned to thepreceding word.

In some embodiments, postprocessing is performed that combines boxesbased on rules. For instance, currency may be accommodated by appendinga currency symbol to a value, recognizing floating point numbers wherecharacters are at a relatively large distance (e.g., due to the wayreceipts may be written), performing date formatting, etc.

Some embodiments are able to recognize that currency values should begrouped into a single word by applying certain rules. For instance, ifthis number is preceded by a currency sign (e.g., $,

, £, ¥, etc.), the subroutine may be generally written as:

START  Append each integer following currency sign to word;  If not aninteger or decimal point, ignore;  If a decimal point is found with atleast one number  thereafter:   Append decimal point;   Append eachinteger after decimal point; END

Such a subroutine could also accommodate floating point numbers that arelikely currency, but do not have a currency sign, by first searchingadjacent characters having numbers for a decimal point locatedtherebetween, but ending in a two-integer number after the decimalpoint.

To improve the speed of OCR model execution, some element may beprocessed using CPUs and others may be processed using GPUs. Whilerunning an OCR model, while most operations are faster on a GPU, thereis an added cost to moving all data for GPU processing (i.e., a memorycopy from the CPU to the GPU), some functions are not implementedeffectively for GPUs, etc. For speed purposes, GPUs may be used most ofthe time, but augmented with CPU processing to improve speed.

In some embodiments, it is desirable to not only identify what elementsinclude text, but also to identify what elements do not include text.For example, an OCR algorithm may initially identify an edge of a buttonas a parenthesis. Negative rules help the system to make suchdistinctions. This can be an issue starting with the synthetic datageneration stage, where it is more difficult to provide quality negativeexamples in generated data. Real images tend to have various artifactswithout text, which can be hard to replicate since they tend to benumerous. In order to assist in training, icons, random boxes taken fromimages (while not overlapping with text), and graphical elements thatlead to bad predictions may be incorporated.

The data for training an OCR model tends to differ substantially fromthe data used to train a graphical component detection model, forexample. In graphical element detection, boxes around edges of acomponent may not need to be perfect. If the boxes are not drawn veryaccurately for detecting buttons, for example, this tends not to impactaccuracy as much. However, for text, if the box is not accurately drawn(e.g., a bit to the right), the box may no longer be considered tocontain the first letter. Thus, the OCR model stage would not be able toidentify the correct word. In other words, for text, if boxes are toosmall and letters intersect with edges of graphical components, theletters may not be recognized. For instance, if the tail of the letter“p” is cut off by an edge, the OCR model may determine that thecharacter looks more similar to an “a” and identify it as such. Moreemphasis may thus be placed on edges of graphical components in textualelement detection model training and in tagging. A model that providesmore accurate box margins may be employed in some embodiments, such ascascade R-CNN.

Per the above, in some embodiments, video images may come from a VDEserver, and may be of a visual display or a part thereof. Some exampleVMs include, but are not limited to, those provided by Citrix®, VMWare®,VNC®, Windows® Remote Desktop, etc. However, images may also come fromother sources, including, but not limited to, Flash, Silverlight, or PDFdocuments, image files of various formats (e.g., JPG, BMP, PNG, etc.),or any other suitable image source without deviating from the scope ofthe invention. Such images may include, but are not limited to, awindow, a document, a financial receipt, an invoice, etc.

FIG. 2 is an architectural diagram illustrating an RPA system 200,according to an embodiment of the present invention. RPA system 200includes a designer 210 that allows a developer to design and implementworkflows. Designer 210 may provide a solution for applicationintegration, as well as automating third-party applications,administrative Information Technology (IT) tasks, and business ITprocesses. Designer 210 may facilitate development of an automationproject, which is a graphical representation of a business process.Simply put, designer 210 facilitates the development and deployment ofworkflows and robots.

The automation project enables automation of rule-based processes bygiving the developer control of the execution order and the relationshipbetween a custom set of steps developed in a workflow, defined herein as“activities.” One commercial example of an embodiment of designer 210 isUiPath Studio™. Each activity may include an action, such as clicking abutton, reading a file, writing to a log panel, etc. In someembodiments, workflows may be nested or embedded.

Some types of workflows may include, but are not limited to, sequences,flowcharts, Finite State Machines (FSMs), and/or global exceptionhandlers. Sequences may be particularly suitable for linear processes,enabling flow from one activity to another without cluttering aworkflow. Flowcharts may be particularly suitable to more complexbusiness logic, enabling integration of decisions and connection ofactivities in a more diverse manner through multiple branching logicoperators. FSMs may be particularly suitable for large workflows. FSMsmay use a finite number of states in their execution, which aretriggered by a condition (i.e., transition) or an activity. Globalexception handlers may be particularly suitable for determining workflowbehavior when encountering an execution error and for debuggingprocesses.

Once a workflow is developed in designer 210, execution of businessprocesses is orchestrated by conductor 220, which orchestrates one ormore robots 230 that execute the workflows developed in designer 210.One commercial example of an embodiment of conductor 220 is UiPathOrchestrator™. Conductor 220 facilitates management of the creation,monitoring, and deployment of resources in an environment. Conductor 220may act as an integration point with third-party solutions andapplications.

Conductor 220 may manage a fleet of robots 230, connecting and executingrobots 230 from a centralized point. Types of robots 230 that may bemanaged include, but are not limited to, attended robots 232, unattendedrobots 234, development robots (similar to unattended robots 234, butused for development and testing purposes), and nonproduction robots(similar to attended robots 232, but used for development and testingpurposes). Attended robots 232 are triggered by user events and operatealongside a human on the same computing system. Attended robots 232 maybe used with conductor 220 for a centralized process deployment andlogging medium. Attended robots 232 may help the human user accomplishvarious tasks, and may be triggered by user events. In some embodiments,processes cannot be started from conductor 220 on this type of robotand/or they cannot run under a locked screen. In certain embodiments,attended robots 232 can only be started from a robot tray or from acommand prompt. Attended Robots 232 should run under human supervisionin some embodiments.

Unattended robots 234 run unattended in virtual environments and canautomate many processes. Unattended robots 234 may be responsible forremote execution, monitoring, scheduling, and providing support for workqueues. Debugging for all robot types may be run in designer 210 in someembodiments. Both attended and unattended robots may automate varioussystems and applications including, but not limited to, mainframes, webapplications, VMs, enterprise applications (e.g., those produced bySAP®, SalesForce®, Oracle®, etc.), and computing system applications(e.g., desktop and laptop applications, mobile device applications,wearable computer applications, etc.).

Conductor 220 may have various capabilities including, but not limitedto, provisioning, deployment, configuration, queueing, monitoring,logging, and/or providing interconnectivity. Provisioning may includecreating and maintenance of connections between robots 230 and conductor220 (e.g., a web application). Deployment may include assuring thecorrect delivery of package versions to assigned robots 230 forexecution. Configuration may include maintenance and delivery of robotenvironments and process configurations. Queueing may include providingmanagement of queues and queue items. Monitoring may include keepingtrack of robot identification data and maintaining user permissions.Logging may include storing and indexing logs to a database (e.g., anSQL database) and/or another storage mechanism (e.g., ElasticSearch®,which provides the ability to store and quickly query large datasets).Conductor 220 may provide interconnectivity by acting as the centralizedpoint of communication for third-party solutions and/or applications.

Robots 230 are execution agents that run workflows built in designer210. One commercial example of some embodiments of robot(s) 230 isUiPath Robots™. In some embodiments, robots 230 install the MicrosoftWindows® Service Control Manager (SCM)-managed service by default. As aresult, such robots 230 can open interactive Windows® sessions under thelocal system account, and have the rights of a Windows® service.

In some embodiments, robots 230 can be installed in a user mode. Forsuch robots 230, this means they have the same rights as the user underwhich a given robot 230 has been installed. This feature may also beavailable for High Density (HD) robots, which ensure full utilization ofeach machine at its maximum potential. In some embodiments, any type ofrobot 230 may be configured in an HD environment.

Robots 230 in some embodiments are split into several components, eachbeing dedicated to a particular automation task. The robot components insome embodiments include, but are not limited to, SCM-managed robotservices, user mode robot services, executors, agents, and command line.SCM-managed robot services manage and monitor Windows® sessions and actas a proxy between conductor 220 and the execution hosts (i.e., thecomputing systems on which robots 230 are executed). These services aretrusted with and manage the credentials for robots 230. A consoleapplication is launched by the SCM under the local system.

User mode robot services in some embodiments manage and monitor Windows®sessions and act as a proxy between conductor 220 and the executionhosts. User mode robot services may be trusted with and manage thecredentials for robots 230. A Windows® application may automatically belaunched if the SCM-managed robot service is not installed.

Executors may run given jobs under a Windows® session (i.e., they mayexecute workflows. Executors may be aware of per-monitor dots per inch(DPI) settings. Agents may be Windows® Presentation Foundation (WPF)applications that display the available jobs in the system tray window.Agents may be a client of the service. Agents may request to start orstop jobs and change settings. The command line is a client of theservice. The command line is a console application that can request tostart jobs and waits for their output.

Having components of robots 130 split as explained above helpsdevelopers, support users, and computing systems more easily run,identify, and track what each component is executing. Special behaviorsmay be configured per component this way, such as setting up differentfirewall rules for the executor and the service. The executor may alwaysbe aware of DPI settings per monitor in some embodiments. As a result,workflows may be executed at any DPI, regardless of the configuration ofthe computing system on which they were created. Projects from designer110 may also be independent of browser zoom level in some embodiments.For applications that are DPI-unaware or intentionally marked asunaware, DPI may be disabled in some embodiments.

FIG. 3 is an architectural diagram illustrating a deployed RPA system300, according to an embodiment of the present invention. In someembodiments, RPA system 300 may be, or may be a part of, RPA system 200of FIG. 2. It should be noted that the client side, the server side, orboth, may include any desired number of computing systems withoutdeviating from the scope of the invention. On the client side, a robotapplication 310 includes executors 312, an agent 314, and a designer316. However, in some embodiments, designer 316 may not be running oncomputing system 310. Executors 312 are running processes. Severalbusiness projects may run simultaneously, as shown in FIG. 3. Agent 314(e.g., a Windows® service) is the single point of contact for allexecutors 312 in this embodiment. All messages in this embodiment arelogged into conductor 330, which processes them further via databaseserver 340, indexer server 350, or both. As discussed above with respectto FIG. 2, executors 312 may be robot components.

In some embodiments, a robot represents an association between a machinename and a username. The robot may manage multiple executors at the sametime. On computing systems that support multiple interactive sessionsrunning simultaneously (e.g., Windows® Server 2012), there multiplerobots may be running at the same time, each in a separate Windows®session using a unique username. This is referred to as HD robots above.

Agent 314 is also responsible for sending the status of the robot (e.g.,periodically sending a “heartbeat” message indicating that the robot isstill functioning) and downloading the required version of the packageto be executed. The communication between agent 314 and conductor 330 isalways initiated by agent 314 in some embodiments. In the notificationscenario, agent 314 may open a Web Socket channel that is later used byconductor 330 to send commands to the robot (e.g., start, stop, etc.).

On the server side, a presentation layer (web application 332, Open DataProtocol (OData) Representative State Transfer (REST) ApplicationProgramming Interface (API) endpoints 334, and notification andmonitoring 336), a service layer (API implementation/business logic338), and a persistence layer (database server 340 and indexer server350) are included. Conductor 330 includes web application 332, ODataREST API endpoints 334, notification and monitoring 336, and APIimplementation/business logic 338. In some embodiments, most actionsthat a user performs in the interface of conductor 320 (e.g., viabrowser 320) are performed by calling various APIs. Such actions mayinclude, but are not limited to, starting jobs on robots,adding/removing data in queues, scheduling jobs to run unattended, etc.without deviating from the scope of the invention. Web application 332is the visual layer of the server platform. In this embodiment, webapplication 332 uses Hypertext Markup Language (HTML) and JavaScript(JS). However, any desired markup languages, script languages, or anyother formats may be used without deviating from the scope of theinvention. The user interacts with web pages from web application 332via browser 320 in this embodiment in order to perform various actionsto control conductor 330. For instance, the user may create robotgroups, assign packages to the robots, analyze logs per robot and/or perprocess, start and stop robots, etc.

In addition to web application 332, conductor 330 also includes servicelayer that exposes OData REST API endpoints 334. However, otherendpoints may be included without deviating from the scope of theinvention. The REST API is consumed by both web application 332 andagent 314. Agent 314 is the supervisor of one or more robots on theclient computer in this embodiment.

The REST API in this embodiment covers configuration, logging,monitoring, and queueing functionality. The configuration endpoints maybe used to define and configure application users, permissions, robots,assets, releases, and environments in some embodiments. Logging RESTendpoints may be used to log different information, such as errors,explicit messages sent by the robots, and other environment-specificinformation, for instance. Deployment REST endpoints may be used by therobots to query the package version that should be executed if the startjob command is used in conductor 330. Queueing REST endpoints may beresponsible for queues and queue item management, such as adding data toa queue, obtaining a transaction from the queue, setting the status of atransaction, etc.

Monitoring rest endpoints monitor web application 332 and agent 314.Notification and monitoring API 336 may be REST endpoints that are usedfor registering agent 314, delivering configuration settings to agent314, and for sending/receiving notifications from the server and agent314. Notification and monitoring API 336 may also use Web Socketcommunication in some embodiments.

The persistence layer includes a pair of servers in thisembodiment—database server 340 (e.g., a SQL server) and indexer server350. Database server 340 in this embodiment stores the configurations ofthe robots, robot groups, associated processes, users, roles, schedules,etc. This information is managed through web application 332 in someembodiments. Database server 340 may manages queues and queue items. Insome embodiments, database server 340 may store messages logged by therobots (in addition to or in lieu of indexer server 350).

Indexer server 350, which is optional in some embodiments, stores andindexes the information logged by the robots. In certain embodiments,indexer server 350 may be disabled through configuration settings. Insome embodiments, indexer server 350 uses ElasticSearch®, which is anopen source project full-text search engine. Messages logged by robots(e.g., using activities like log message or write line) may be sentthrough the logging REST endpoint(s) to indexer server 350, where theyare indexed for future utilization.

FIG. 4 is an architectural diagram illustrating the relationship 400between a designer 410, activities 420, 430, and drivers 440, accordingto an embodiment of the present invention. Per the above, a developeruses designer 410 to develop workflows that are executed by robots.Workflows may include user-defined activities 420 and UI automationactivities 430. Some CV activities may include, but are not limited to,click, type, get text, hover, element exists, refresh scope, highlight,etc. Click in some embodiments identifies an element using CV, OCR,fuzzy text matching, and multi-anchor, for example, and clicks it. Typemay identify an element using the above and types in the element. Gettext may identify the location of specific text and scan it using OCR.Hover may identify an element and hover over it. Element exists maycheck whether an element exists on the screen using the techniquesdescribed above. In some embodiments, there may be hundreds or eventhousands of activities that can be implemented in designer 410.However, any number and/or type of activities may be available withoutdeviating from the scope of the invention.

UI automation activities 430 are a subset of special, lower levelactivities that are written in lower level code (e.g., CV activities)and facilitate interactions with the screen. UI automation activities430 facilitate these interactions via drivers 440 that allow the robotto interact with the desired software. For instance, drivers 440 mayinclude OS drivers 442, browser drivers 444, VM drivers 446, enterpriseapplication drivers 448, etc.

Drivers 450 may interact with the OS at a low level looking for hooks,monitoring for keys, etc. They may facilitate integration with Chrome®,IE®, Citrix®, SAP®, etc. For instance, the “click” activity performs thesame role in these different applications via drivers 450.

FIG. 5 is an architectural diagram illustrating an RPA system 500,according to an embodiment of the present invention. In someembodiments, RPA system 500 may be or include RPA systems 200 and/or 300of FIGS. 2 and/or 3. RPA system 500 includes multiple client computingsystems 510 running robots. Computing systems 510 are able tocommunicate with a conductor computing system 520 via a web applicationrunning thereon. Conductor computing system 520, in turn, is able tocommunicate with a database server 530 and an optional indexer server540.

With respect to FIGS. 3 and 5, it should be noted that while a webapplication is used in these embodiments, any suitable client/serversoftware may be used without deviating from the scope of the invention.For instance, the conductor may run a server-side application thatcommunicates with non-web-based client software applications on theclient computing systems.

FIG. 6 is an architectural diagram illustrating a computing system 600configured to train an OCR model to detect and recognize text in imagesfor RPA, according to an embodiment of the present invention, accordingto an embodiment of the present invention. In some embodiments,computing system 600 may be one or more of the computing systemsdepicted and/or described herein. Computing system 600 includes a bus605 or other communication mechanism for communicating information, andprocessor(s) 610 coupled to bus 605 for processing information.Processor(s) 610 may be any type of general or specific purposeprocessor, including a Central Processing Unit (CPU), an ApplicationSpecific Integrated Circuit (ASIC), a Field Programmable Gate Array(FPGA), a Graphics Processing Unit (GPU), multiple instances thereof,and/or any combination thereof. Processor(s) 610 may also have multipleprocessing cores, and at least some of the cores may be configured toperform specific functions. Multi-parallel processing may be used insome embodiments. In certain embodiments, at least one of processor(s)610 may be a neuromorphic circuit that includes processing elements thatmimic biological neurons. In some embodiments, neuromorphic circuits maynot require the typical components of a Von Neumann computingarchitecture.

Computing system 600 further includes a memory 615 for storinginformation and instructions to be executed by processor(s) 610. Memory615 can be comprised of any combination of Random Access Memory (RAM),Read Only Memory (ROM), flash memory, cache, static storage such as amagnetic or optical disk, or any other types of non-transitorycomputer-readable media or combinations thereof. Non-transitorycomputer-readable media may be any available media that can be accessedby processor(s) 610 and may include volatile media, non-volatile media,or both. The media may also be removable, non-removable, or both.

Additionally, computing system 600 includes a communication device 620,such as a transceiver, to provide access to a communications network viaa wireless and/or wired connection. In some embodiments, communicationdevice 620 may be configured to use Frequency Division Multiple Access(FDMA), Single Carrier FDMA (SC-FDMA), Time Division Multiple Access(TDMA), Code Division Multiple Access (CDMA), Orthogonal FrequencyDivision Multiplexing (OFDM), Orthogonal Frequency Division MultipleAccess (OFDMA), Global System for Mobile (GSM) communications, GeneralPacket Radio Service (GPRS), Universal Mobile Telecommunications System(UMTS), cdma2000, Wideband CDMA (W-CDMA), High-Speed Downlink PacketAccess (HSDPA), High-Speed Uplink Packet Access (HSUPA), High-SpeedPacket Access (HSPA), Long Term Evolution (LTE), LTE Advanced (LTE-A),802.11x, Wi-Fi, Zigbee, Ultra-WideBand (UWB), 802.16x, 802.15, HomeNode-B (HnB), Bluetooth, Radio Frequency Identification (RFID), InfraredData Association (IrDA), Near-Field Communications (NFC), fifthgeneration (5G), New Radio (NR), any combination thereof, and/or anyother currently existing or future-implemented communications standardand/or protocol without deviating from the scope of the invention. Insome embodiments, communication device 620 may include one or moreantennas that are singular, arrayed, phased, switched, beamforming,beamsteering, a combination thereof, and or any other antennaconfiguration without deviating from the scope of the invention.

Processor(s) 610 are further coupled via bus 605 to a display 625, suchas a plasma display, a Liquid Crystal Display (LCD), a Light EmittingDiode (LED) display, a Field Emission Display (FED), an Organic LightEmitting Diode (OLED) display, a flexible OLED display, a flexiblesubstrate display, a projection display, a 4K display, a high definitiondisplay, a Retina® display, an In-Plane Switching (IPS) display, or anyother suitable display for displaying information to a user. Display 625may be configured as a touch (haptic) display, a three dimensional (3D)touch display, a multi-input touch display, a multi-touch display, etc.using resistive, capacitive, surface-acoustic wave (SAW) capacitive,infrared, optical imaging, dispersive signal technology, acoustic pulserecognition, frustrated total internal reflection, etc. Any suitabledisplay device and haptic I/O may be used without deviating from thescope of the invention.

A keyboard 630 and a cursor control device 635, such as a computermouse, a touchpad, etc., are further coupled to bus 605 to enable a userto interface with computing system 600. However, in certain embodiments,a physical keyboard and mouse may not be present, and the user mayinteract with the device solely through display 625 and/or a touchpad(not shown). Any type and combination of input devices may be used as amatter of design choice. In certain embodiments, no physical inputdevice and/or display is present. For instance, the user may interactwith computing system 600 remotely via another computing system incommunication therewith, or computing system 600 may operateautonomously.

Memory 615 stores software modules that provide functionality whenexecuted by processor(s) 610. The modules include an operating system640 for computing system 600. The modules further include an RPA OCRmodule 645 that is configured to perform all or part of the processesdescribed herein or derivatives thereof. Computing system 600 mayinclude one or more additional functional modules 650 that includeadditional functionality.

One skilled in the art will appreciate that a “system” could be embodiedas a server, an embedded computing system, a personal computer, aconsole, a personal digital assistant (PDA), a cell phone, a tabletcomputing device, a quantum computing system, or any other suitablecomputing device, or combination of devices without deviating from thescope of the invention. Presenting the above-described functions asbeing performed by a “system” is not intended to limit the scope of thepresent invention in any way, but is intended to provide one example ofthe many embodiments of the present invention. Indeed, methods, systems,and apparatuses disclosed herein may be implemented in localized anddistributed forms consistent with computing technology, including cloudcomputing systems.

It should be noted that some of the system features described in thisspecification have been presented as modules, in order to moreparticularly emphasize their implementation independence. For example, amodule may be implemented as a hardware circuit comprising custom verylarge scale integration (VLSI) circuits or gate arrays, off-the-shelfsemiconductors such as logic chips, transistors, or other discretecomponents. A module may also be implemented in programmable hardwaredevices such as field programmable gate arrays, programmable arraylogic, programmable logic devices, graphics processing units, or thelike.

A module may also be at least partially implemented in software forexecution by various types of processors. An identified unit ofexecutable code may, for instance, include one or more physical orlogical blocks of computer instructions that may, for instance, beorganized as an object, procedure, or function. Nevertheless, theexecutables of an identified module need not be physically locatedtogether, but may include disparate instructions stored in differentlocations that, when joined logically together, comprise the module andachieve the stated purpose for the module. Further, modules may bestored on a computer-readable medium, which may be, for instance, a harddisk drive, flash device, RAM, tape, and/or any other suchnon-transitory computer-readable medium used to store data withoutdeviating from the scope of the invention.

Indeed, a module of executable code could be a single instruction, ormany instructions, and may even be distributed over several differentcode segments, among different programs, and across several memorydevices. Similarly, operational data may be identified and illustratedherein within modules, and may be embodied in any suitable form andorganized within any suitable type of data structure. The operationaldata may be collected as a single data set, or may be distributed overdifferent locations including over different storage devices, and mayexist, at least partially, merely as electronic signals on a system ornetwork.

FIG. 7 is a flowchart illustrating a process 700 for training an OCRmodel to detect and recognize text in images for RPA, according to anembodiment of the present invention. The process begins with generatingsynthetic data for training a text detection model at 705. A largeamount of synthetic training data may be generated for initial trainingof the text detection model. In some embodiments, the text detectionmodel may be based on a Faster R-CNN architecture using ResNet-50 as abackbone and may draw boxes around components that are believed toinclude text, or to be text themselves. The text detection model is thentrained over multiple epochs until it reaches its best level of accuracyagainst an evaluation dataset at 710. Training then continues on real,human-labeled data with augmentations (e.g., scale, rotate, translate,change colors, any combination thereof, etc.) at 715 until the bestaccuracy against the evaluation dataset is achieved.

A text recognition model is then trained on the real and synthetic dataat the same time over multiple epochs at 720. The text recognition modelof some embodiments may use an architecture with ResNet-18 and a singleLSTM layer with CTC for text decoding. The same images may be used asfor training the text detection and text recognition models in someembodiments. In certain embodiments, new synthetic images/words aregenerated for each epoch to make training more effective despite arelatively limited number of real, human-labeled images (e.g., 500 orless in some embodiments). In certain embodiments, augmentations areperformed on the training data, but evaluation is on the real data only.A separate dataset may be used in some embodiments for end-to-endevaluation to determine whether the OCR model is good enough forproduction or superior to an existing OCR model.

When generating the synthetic data, some embodiments attempt toprogrammatically generate images that are as close as possible to realimages that the OCR model will encounter after deployment. Scripts maybe used to place words in an image, add some noise, configure the imagein blocks (e.g., paragraphs, boxes that are like tables, boxes thatinclude randomly placed words, etc.), etc., similar to how the texttends to appear on a computing system display. In some embodiments,various elements may be added to the training images, such as icons withno text, boxes and bottom edges without text, random noise (e.g.,randomly added dots of various sizes and shapes), drawing randompolygons in the image of various types, shapes, and sizes, etc. Per theabove, a very large amount of synthetic data may be generated since thiscan be readily achieved with the hardware capabilities existingcomputing systems. The synthetic data is not exactly like real data insome embodiments. In certain embodiments, the synthetic data fortraining the text detection and/or recognition model may includenegative examples. Providing negative examples in addition to positiveexamples may help to make the synthetic data more effective for trainingpurposes. Icons, random boxes taken from images (while not overlappingwith text), graphical elements that lead to bad predictions, etc. may beincorporated as negative examples.

In some embodiments, the OCR model may determine that floating pointnumbers, dates, etc. are a single word. In certain embodiments, thespeed of OCR model execution may be increased by processing someelements using CPUs and other elements using GPUs. In some embodiments,the OCR model determines not only what elements include text, but alsowhat elements to do not include text.

A much smaller sample of human-tagged data may be trained in someembodiments since this data is typically much more expensive and timeconsuming to generate. The synthetic data training phase allows the OCRmodel to become accurate based off of a relatively small number of realsamples. This human-tagged data may be modified to improve accuracy viatraining. For example, labeled images may be scaled, the image may bemade larger or smaller, the image and/or elements therein may berotated, colors may be changed, the image and/or elements therein may bestretched, translated, flipped, etc. Text is different from graphicalcomponents since if you scale text too much (e.g., via shrinking), theability to recognize the text may be lost.

Some embodiments may be trained to recognize text on a screen in adesired number of fonts since such text tends to be relatively similarfrom one image to another. A list of commonly used fonts may be built,and text in these fonts may be randomly chosen and mixed (e.g.,different fonts, spacings, orientations, sizes, etc.). Sizes andspacings tend to vary from one font to another, for example. Certainembodiments may be trained to recognize handwritten text. However, thistraining process may be more extensive and require more synthetic andreal samples since there is a much wider degree of variation inhandwritten text from one individual to another.

In certain embodiments, a relatively small number of character types maybe used (e.g., 100 different characters, which is smaller than the ASCIIcharacter set). For some embodiments, such as those employed torecognize text in invoices, this may encompass most or all of thecharacters that are likely to be encountered in production (e.g., whereinvoices are in English and contain dollar values for a certain enduser). A more limited character set also helps to improve the speed withwhich the OCR model can be trained, and may improve accuracy.

Once the text detection and text recognition models have been trained,they are combined into an OCR model at 725. In some embodiments, aftertraining, the OCR model may be relatively large and not fast enough forsome implementations where results are required quickly and/or where acomputing system running the OCR model has insufficient processingpower. Accordingly, in some embodiments, the larger OCR model is used totrain a smaller and faster OCR model at 730.

A workflow that includes an activity calling the trained OCR model isgenerated at 735. This may be the initial, larger OCR model and/or thesmaller OCR model of step 730. A robot implementing the workflow is thengenerated at 740, and the robot is deployed at 745.

The process steps performed in FIG. 7 may be performed by a computerprogram, encoding instructions for the processor(s) to perform at leastpart of the process(es) described in FIG. 7, in accordance withembodiments of the present invention. The computer program may beembodied on a non-transitory computer-readable medium. Thecomputer-readable medium may be, but is not limited to, a hard diskdrive, a flash device, RAM, a tape, and/or any other such medium orcombination of media used to store data. The computer program mayinclude encoded instructions for controlling processor(s) of a computingsystem (e.g., processor(s) 610 of computing system 600 of FIG. 6) toimplement all or part of the process steps described in FIG. 7, whichmay also be stored on the computer-readable medium.

The computer program can be implemented in hardware, software, or ahybrid implementation. The computer program can be composed of modulesthat are in operative communication with one another, and which aredesigned to pass information or instructions to display. The computerprogram can be configured to operate on a general purpose computer, anASIC, or any other suitable device.

It will be readily understood that the components of various embodimentsof the present invention, as generally described and illustrated in thefigures herein, may be arranged and designed in a wide variety ofdifferent configurations. Thus, the detailed description of theembodiments of the present invention, as represented in the attachedfigures, is not intended to limit the scope of the invention as claimed,but is merely representative of selected embodiments of the invention.

The features, structures, or characteristics of the invention describedthroughout this specification may be combined in any suitable manner inone or more embodiments. For example, reference throughout thisspecification to “certain embodiments,” “some embodiments,” or similarlanguage means that a particular feature, structure, or characteristicdescribed in connection with the embodiment is included in at least oneembodiment of the present invention. Thus, appearances of the phrases“in certain embodiments,” “in some embodiment,” “in other embodiments,”or similar language throughout this specification do not necessarily allrefer to the same group of embodiments and the described features,structures, or characteristics may be combined in any suitable manner inone or more embodiments.

It should be noted that reference throughout this specification tofeatures, advantages, or similar language does not imply that all of thefeatures and advantages that may be realized with the present inventionshould be or are in any single embodiment of the invention. Rather,language referring to the features and advantages is understood to meanthat a specific feature, advantage, or characteristic described inconnection with an embodiment is included in at least one embodiment ofthe present invention. Thus, discussion of the features and advantages,and similar language, throughout this specification may, but do notnecessarily, refer to the same embodiment.

Furthermore, the described features, advantages, and characteristics ofthe invention may be combined in any suitable manner in one or moreembodiments. One skilled in the relevant art will recognize that theinvention can be practiced without one or more of the specific featuresor advantages of a particular embodiment. In other instances, additionalfeatures and advantages may be recognized in certain embodiments thatmay not be present in all embodiments of the invention.

One having ordinary skill in the art will readily understand that theinvention as discussed above may be practiced with steps in a differentorder, and/or with hardware elements in configurations which aredifferent than those which are disclosed. Therefore, although theinvention has been described based upon these preferred embodiments, itwould be apparent to those of skill in the art that certainmodifications, variations, and alternative constructions would beapparent, while remaining within the spirit and scope of the invention.In order to determine the metes and bounds of the invention, therefore,reference should be made to the appended claims.

1. A computer-implemented method, comprising: generating a set ofsynthetic data, by a computing system; training a text recognition modelfor robotic process automation (RPA) on augmented human-labeled data andthe set of synthetic data over a first plurality of epochs, by thecomputing system; and at each epoch of the first plurality of epochs,evaluating performance of the text recognition model against anevaluation dataset until a level of accuracy of the performance beginsto decline, by the computing system.
 2. The computer-implemented methodof claim 1, further comprising: training a text detection model for RPAon the set of synthetic data over a second plurality of epochs, by thecomputing system; and at each epoch of the second plurality of epochs,evaluating performance of the text detection model against theevaluation dataset until a level of accuracy of the performance beginsto decline, by the computing system.
 3. The computer-implemented methodof claim 2, further comprising: combining the text detection model andthe text recognition model into an optical character recognition (OCR)model, by the computing system, wherein the text detection model and thetext recognition model are trained separately and then combined forruntime.
 4. The computer-implemented method of claim 3, furthercomprising: training a smaller, faster OCR model using the OCR model, bythe computing system.
 5. The computer-implemented method of claim 3,further comprising: generating a workflow comprising an activity callingthe OCR model, by the computing system; generating an RPA robotimplementing the workflow, by the computing system; and deploying theRPA robot, by the computing system.
 6. The computer-implemented methodof claim 2, wherein the text detection model is trained solely usingsynthetic data.
 7. The computer-implemented method of claim 1, whereinthe text recognition model comprises a residual network and a singlelong short term (LSTM) memory layer with connectionist temporalclassification (TC) for text decoding.
 8. The computer-implementedmethod of claim 1, wherein the generation of the set of synthetic datacomprises placing words in images, adding random noise, configuring theimages in blocks, or any combination thereof.
 9. Thecomputer-implemented method of claim 1, wherein the generation of theset of synthetic data comprises adding icons with no text, drawingrandom polygons in one or more of the images of various types, shapes,and/or sizes, or any combination thereof.
 10. The computer-implementedmethod of claim 1, wherein the generation of the set of synthetic datacomprises building a list of fonts and randomly choosing, mixing, andinserting text in these fonts into the synthetic data.
 11. Thecomputer-implemented method of claim 1, wherein the generation of theset of synthetic data comprises generating negative examples.
 12. Thecomputer-implemented method of claim 1, wherein the text recognitionmodel is configured to determine floating point numbers or dates assingle words.
 13. The computer-implemented method of claim 1, wherein anumber of character types recognized by the text recognition model isless than or equal to
 100. 14. The computer-implemented method of claim1, wherein the text recognition model is trained using one or moreadditional sets of training data over respective epochs.
 15. Anon-transitory computer-readable medium storing a computer program, thecomputer program configured to cause at least one processor to: generatea set of synthetic data; train a text detection model for roboticprocess automation (RPA) solely on the set of synthetic data over afirst plurality of epochs; at each epoch of the first plurality ofepochs, evaluate performance of the text detection model against anevaluation dataset until a level of accuracy of the performance beginsto decline; train a text recognition model for RPA on augmentedhuman-labeled data and the set of synthetic data over a second pluralityof epochs; and at each epoch of second the plurality of epochs, evaluateperformance of the text recognition model against the evaluation datasetuntil a level of accuracy of the performance begins to decline.
 16. Thenon-transitory computer-readable medium of claim 15, wherein thecomputer program is further configured to cause the at least oneprocessor to: combine the text detection model and the text recognitionmodel into an optical character recognition (OCR) model, wherein thetext detection model and the text recognition model are trainedseparately and then combined for runtime.
 17. The non-transitorycomputer-readable medium of claim 16, further comprising: training asmaller, faster OCR model using the OCR model, by the computing system.18. The non-transitory computer-readable medium of claim 15, wherein thegeneration of the set of synthetic data comprises placing words inimages, adding random noise, configuring the images in blocks, or anycombination thereof.
 19. The non-transitory computer-readable medium ofclaim 15, wherein the generation of the set of synthetic data comprisesadding icons with no text, drawing random polygons in one or more of theimages of various types, shapes, and/or sizes, or any combinationthereof.
 20. The non-transitory computer-readable medium of claim 15,wherein the generation of the set of synthetic data comprises building alist of fonts and randomly choosing, mixing, and inserting text in thesefonts into the synthetic data.
 21. The non-transitory computer-readablemedium of claim 15, wherein the generation of the set of synthetic datacomprises generating negative examples.
 22. The non-transitorycomputer-readable medium of claim 15, wherein the computer program isfurther configured to cause the at least one processor to train the textdetection model, the text recognition model, or both, using one or moreadditional sets of training data over respective epochs.
 23. Thenon-transitory computer-readable medium of claim 15, wherein a number ofcharacter types recognized by the text recognition model is less than orequal to
 100. 24. A computer-implemented method for training an opticalcharacter recognition (OCR) model, comprising: generating a set ofsynthetic data, by a computing system; training a text recognition modelfor robotic process automation (RPA) on augmented human-labeled data andthe set of synthetic data over a plurality of epochs, by the computingsystem; and at each epoch of the plurality of epochs, evaluatingperformance of the text recognition model against the evaluation datasetuntil a level of accuracy of the performance begins to decline, by thecomputing system; combining the text detection model and the textrecognition model into an optical character recognition (OCR) model, bythe computing system; and training a smaller, faster OCR model using theOCR model, by the computing system.
 25. The computer-implemented methodof claim 24, wherein the generation of the set of synthetic datacomprises: placing words in images, adding random noise, configuring theimages in blocks, or any combination thereof, adding icons with no text,drawing random polygons in one or more of the images of various types,shapes, and/or sizes, or any combination thereof, building a list offonts and randomly choosing, mixing, and inserting text in these fontsinto the synthetic data, generating negative examples, or anycombination thereof.
 26. The computer-implemented method of claim 24,further comprising: training the text recognition model using one ormore additional sets of training data over respective epochs, by thecomputing system.
 27. The computer-implemented method of claim 24,wherein a number of character types recognized by the text recognitionmodel is less than or equal to 100.